package com.fjwt.gz.mch.ctrl.privacy;

import com.fjwt.gz.core.cache.RedisUtil;
import com.fjwt.gz.core.constants.CS;
import com.fjwt.gz.core.model.ApiRes;
import com.fjwt.gz.db.entity.AgentAppEntity;
import com.fjwt.gz.mch.ctrl.CommonCtrl;
import com.fjwt.gz.service.impl.AgentAppService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *隐私服务管理
 * @Author: cyh
 * @Date:
 * @Version: 1.0
 */
@RestController
@Slf4j
@RequestMapping("/api/lite")
public class PrivacyPolicyController extends CommonCtrl {

    @Autowired
    private AgentAppService agentAppService;

    @PostMapping("/configInfo")
    public ApiRes agreement() {
        String appid = request.getHeader("appid");
        log.info("C端用户查看隐私政策，请求地址：/api/privacy/privacyPolicy，请求参数：appid：{}", appid);
        AgentAppEntity agreement = agentAppService.agreement(appid);
        return ApiRes.ok(agreement);
    }

}
